package com.jeesite.modules.exam.notice.service;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.exam.notice.dao.DcSupExamNoticeOrgDao;
import com.jeesite.modules.exam.notice.entity.DcSupExamNoticeOrg;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 考核任务通知表-被通知单位Service
 * @author xhc
 * @version 2022-05-28
 */
@Service
@Transactional(readOnly=false)
public class DcSupExamNoticeOrgService extends CrudService<DcSupExamNoticeOrgDao, DcSupExamNoticeOrg> {
	
	/**
	 * 获取单条数据
	 * @param dcSupExamNoticeOrg
	 * @return
	 */
	@Override
	public DcSupExamNoticeOrg get(DcSupExamNoticeOrg dcSupExamNoticeOrg) {
		return super.get(dcSupExamNoticeOrg);
	}
	
	/**
	 * 查询分页数据
	 * @param dcSupExamNoticeOrg 查询条件
	 * @param dcSupExamNoticeOrg.page 分页对象
	 * @return
	 */
	@Override
	public Page<DcSupExamNoticeOrg> findPage(DcSupExamNoticeOrg dcSupExamNoticeOrg) {
		return super.findPage(dcSupExamNoticeOrg);
	}
	
	/**
	 * 查询列表数据
	 * @param dcSupExamNoticeOrg
	 * @return
	 */
	@Override
	public List<DcSupExamNoticeOrg> findList(DcSupExamNoticeOrg dcSupExamNoticeOrg) {
		return super.findList(dcSupExamNoticeOrg);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param dcSupExamNoticeOrg
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(DcSupExamNoticeOrg dcSupExamNoticeOrg) {
		super.save(dcSupExamNoticeOrg);
	}
	
	/**
	 * 更新状态
	 * @param dcSupExamNoticeOrg
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(DcSupExamNoticeOrg dcSupExamNoticeOrg) {
		super.updateStatus(dcSupExamNoticeOrg);
	}
	
	/**
	 * 删除数据
	 * @param dcSupExamNoticeOrg
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(DcSupExamNoticeOrg dcSupExamNoticeOrg) {
		super.delete(dcSupExamNoticeOrg);
	}

	public void deleteByNoticeId(DcSupExamNoticeOrg deOrg) {
		dao.deleteByEntity(deOrg);
	}
	@Transactional(readOnly=false)
	public long updateDcSupExamNoticeOrg(DcSupExamNoticeOrg deOrg) {
		long update = dao.update(deOrg);
		return update;
	}
}